package com.rfqx.service;

import com.rfqx.dao.UserDao;
import com.rfqx.entity.Login;
import com.rfqx.entity.User;

public class UserService {

	private UserDao dao;
	
	public UserService() {
		
		dao = new UserDao();
	
	}
	
	public boolean isValidLogin (Login login) {
		
		User user = dao.findByUserName (login.getUserName());
		
		if (user == null) return false;
		
		return  user.getLogin().equals(login) ;
		
	}
	
	
}
